@namespace MduiBlazor
@inherits MduiComponentBase

<div class="@Classname" style="@Style" @attributes="@AdditionalAttributes">
    @if (!string.IsNullOrWhiteSpace(ImgSrc))
    {
        <img class="mdui-chip-icon" src="@ImgSrc" />
    }
    @if (IconContent is not null || !string.IsNullOrWhiteSpace(Icon) || !string.IsNullOrWhiteSpace(IconLetter))
    {
        <span class="@IconClassname">
            @if (IconContent is not null)
            {
                @IconContent
            }
            else if (!string.IsNullOrWhiteSpace(Icon))
            {
                <MduiIcon Icon="@Icon" />
            }
            else if (!string.IsNullOrWhiteSpace(IconLetter))
            {
                @IconLetter
            }
        </span>
    }
    <span class="mdui-chip-title">@Title</span>
    @if (DeleteButton)
    {
        <span class="mdui-chip-delete" @onclick="@OnDeleteButtonClicked">
            <MduiIcon Icon="cancel" />
        </span>
    }
</div>